#! /bin/bash

EXTENSION_NAME=externalfeed

VERSION=$1



mkdir -p dest/chrome
cd src/chrome
find -type f | grep -v .svn | grep -v ~ | xargs zip ../../dest/chrome/$EXTENSION_NAME.jar 
cd ../../

cp -a src/defaults src/install.rdf dest
cd dest
find -type f | grep -v .svn | grep -v ~ | xargs zip ../web/$EXTENSION_NAME-$VERSION.xpi 
cd ..

rm -rf dest/

